<template>
    <div class="video-detail-container">
        <div class="content-wrapper">
            <div style="padding: 24px">
                <div class="video-title">《军事信息资源分类法》特色和应用</div>
                <div class="video-player-section">
                    <div class="video-container">
                        <VideoJsPlayer width="1017px" height="540px" :sources="videoSources" :poster="poster"
                            class="video-player" />
                    </div>
                    <div class="video-info-panel">
                        <div class="panel-title">视频详情</div>
                        <div class="info-item">
                            <div class="info-label">
                                标题:
                                <span class="info-content">《军事信息资源分类法》 特色和应用</span>
                            </div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">专题:</div>
                            <div class="info-content">军事战略-战略演戏回</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">发布时间:</div>
                            <div class="info-content">2025-09-23 12</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">时长:</div>
                            <div class="info-content">28分钟</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">分辨率:</div>
                            <div class="info-content">720P、1080P</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">语种:</div>
                            <div class="info-content">中文</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">国家/地区:</div>
                            <div class="info-content">中国</div>
                        </div>
                    </div>
                </div>
                <div class="stats-section">
                    <div class="stats-container">
                        <div class="stat-item">
                            <i class="iconfont icon-datubiao"></i>
                            <span class="stat-value">1.28万</span>
                        </div>
                        <div class="stat-item">
                            <i class="iconfont icon-xiazailiang"></i>
                            <span class="stat-value">382</span>
                        </div>
                        <div class="stat-item">
                            <i class="iconfont icon-shoucangliang"></i>
                            <span class="stat-value">1111111</span>
                        </div>
                    </div>
                    <div class="action-buttons">
                        <el-button type="primary" icon="iconfont icon-shoucangliang">收藏</el-button>
                        <el-button type="primary" icon="iconfont icon-xiazailiang">下载</el-button>
                    </div>
                </div>
                <div class="video-description">
                    <div class="description-title">
                        视频简介：
                        <span class="description-content">
                            为迎接2022年"世界读书日"的到来，响应联合国教科文组织向全世界发出的"走向阅读社会"的号召，进一步提高军校师生了解信息知识、高效检索文献、有效利用文献资料等信息素养，养成乐于阅读、"悦"享知网的主题活动。面向的是军校图书馆人员，通过行业内资深专家的讲座，为军校图书馆人员提供学习的新思路和新方向。
                        </span>
                    </div>
                </div>
                <div style="display: flex; align-items: center; margin: 24px 0">
                    <el-input v-model="input" style="width: 620px; margin-right: 20px" placeholder="请输入关键字"></el-input>
                    <el-button type="primary">确定</el-button>
                </div>
                <div class="content-card">
                    <div class="contentitem" v-for="item in 5" :key="item">
                        <div class="tu"><i class="iconfont icon-xiala1"></i></div>
                        <div class="zi">
                            <div class="tian"></div>
                            <div class="content-wrapper11">
                                <div class="content-main">
                                    <div class="time-stamp">00:56-02:12</div>
                                    <div class="content-text">
                                        中国人民抗日军事战略的理论和实践,既有对中国传统军事思想精髓的继承,也有对现代战争....
                                    </div>
                                </div>
                                <div class="action-buttons">
                                    <div class="action-item">
                                        <i class="iconfont icon-xiazailiang"></i>
                                        <span class="stat-value">下载</span>
                                    </div>
                                    <div class="action-item" v-if="item < 5">
                                        <i class="iconfont icon-shoucangliang"></i>
                                        <span class="stat-value">收藏</span>
                                    </div>
                                    <div class="action-item1" v-else>
                                        <i class="iconfont icon-shoucangliang"></i>
                                        <span class="stat-value">取消收藏</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="related-resources">
                    <div class="related-resources__header">
                        <div class="related-resources__line1"></div>
                        <h3 class="related-resources__title">相关资源推荐</h3>
                        <div class="related-resources__line2"></div>
                    </div>
                </div>

                <div class="recommended-article">
                    <div class="article-container" v-for="item in 9" :key="item">
                        <div class="article-card">
                            <div class="article-image">
                                <img src="https://ts1.tc.mm.bing.net/th/id/R-C.8bbf769b39bb26eefb9b6de51c23851d?rik=crTnc5i8A%2b8p7A&riu=http%3a%2f%2fpicview.iituku.com%2fcontentm%2fzhuanji%2fimg%2f202207%2f09%2fe7196ac159f7cf2b.jpg%2fnu&ehk=DYPLVpoNAXLj5qzwgR5vHf9DladFh%2b34s4UcuP3Kn6E%3d&risl=&pid=ImgRaw&r=0"
                                    alt="推广人文阅读" />
                            </div>
                            <div class="article-content">
                                <h3 class="article-title">
                                    推广人文阅读 打造书香医苑 让"悦读"成重新上线首先是实现
                                </h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import VideoJsPlayer from "@/components/VideoJsPlayer.vue";

export default {
    components: { VideoJsPlayer },
    data() {
        return {
            input: "",
            videoSources: {
                hd: {
                    src: "https://video.people.cn/upload/vod/user1739759454736028/1761567912222228/origin.mp4",
                    type: "video/mp4",
                },
            },
            poster: "",
        };
    },
};
</script>

<style lang="scss" scoped>
.recommended-article {
    width: 1354px;
    // background: red;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .article-container {
        width: 424px;
    }

    .article-card {
        width: 424px;
        margin-bottom: 40px;

        .article-image {
            width: 424px;
            height: 280px;
            overflow: hidden;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        .article-content {
            //   padding: 15px;
            margin-top: 16px;

            .article-title {
                font-family: PingFangSC, PingFang SC;
                font-weight: 400;
                font-size: 22px;
                color: #333333;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                width: 100%;
            }
        }
    }
}

.related-resources {
    // padding: 20px 0;
    margin-top: 45px;
}

.related-resources__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.related-resources__line1 {
    width: 568px;

    height: 2px;
    background: linear-gradient(90deg, rgba(50, 125, 255, 0) 0%, #327dff 100%);
    position: relative;

    &::before {
        content: "";
        position: absolute;
        right: -3px;
        top: 50%;
        transform: translateY(-50%);
        background: #ffffff;
        border: 2px solid #327dff;
        width: 6px;
        height: 7px;
        border-radius: 50%;
    }
}

.related-resources__line2 {
    width: 568px;
    height: 2px;
    background: linear-gradient(90deg, #327dff 0%, rgba(50, 125, 255, 0) 100%);
    position: relative;

    &::before {
        content: "";
        position: absolute;
        left: -3px;
        top: 50%;
        transform: translateY(-50%);
        background: #ffffff;
        border: 2px solid #327dff;
        width: 6px;
        height: 7px;
        border-radius: 50%;
    }
}

.related-resources__title {
    font-family: PingFangSC, PingFang SC;
    font-weight: 500;
    font-size: 24px;
    color: #333333;
}

.content-card {
    .contentitem {
        display: flex;
        background: #ffffff;
        border-radius: 8px;
        border: 1px solid #e4e4e4;
        width: 1295px;
        // height: 106px;
        padding: 24px 29px;
        margin-bottom: 16px;

        .tu {
            width: 60px;
            height: 48px;
            background: #a4a4a4;
            border-radius: 4px;
            margin-right: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;

            i {
                font-size: 20px;
                color: #ffffff;
                transform: rotate(-90deg);
            }
        }

        .zi {
            .tian {
                width: 1222px;
                height: 8px;
                background: #f4f4f4;
                border-radius: 16px;
                margin-bottom: 16px;
            }

            .content-wrapper11 {
                display: flex;
                justify-content: space-between;

                .content-main {
                    display: flex;
                    font-family: PingFangSC, PingFang SC;
                    font-weight: 400;
                    font-size: 18px;
                    color: #333333;

                    .time-stamp {
                        margin-right: 10px;
                    }

                    .content-text {
                        width: 851px;
                    }
                }
            }

            .action-buttons {
                display: flex;

                .action-item {
                    cursor: pointer;
                    margin-left: 24px;
                    font-family: PingFangSC, PingFang SC;
                    font-weight: 400;
                    font-size: 18px;

                    .stat-value {
                        color: #333333;
                    }

                    i {
                        color: #999999;
                        margin-right: 14px;
                    }

                    &:hover {
                        .stat-value {
                            color: #eda13a;
                        }

                        i {
                            color: #eda13a;
                        }
                    }
                }

                .action-item1 {
                    cursor: pointer;
                    margin-left: 24px;
                    font-family: PingFangSC, PingFang SC;
                    font-weight: 400;
                    font-size: 18px;

                    .stat-value {
                        color: #eda13a;
                    }

                    i {
                        color: #eda13a;
                        margin-right: 14px;
                    }
                }
            }
        }
    }
}

.video-player-section {
    display: flex;

    .video-container {
        width: 1017px;
        height: 540px;
    }

    .video-info-panel {
        margin-left: 16px;
        width: 319px;
        height: 540px;
        background: #f9faff;
        border-radius: 8px;
        border: 1px solid #e3edff;
        padding: 20px;
        box-sizing: border-box;

        .panel-title {
            font-family: PingFangSC, PingFang SC;
            font-weight: 500;
            font-size: 24px;
            color: #333333;
            margin-bottom: 16px;
        }

        .info-item {
            margin-bottom: 24px;
            display: flex;
            align-items: flex-start;

            .info-label {
                font-family: PingFangSC, PingFang SC;
                font-weight: 500;
                font-size: 18px;
                color: #333333;
                line-height: 26px;
                // line-height: 30px;

                margin-right: 10px;
            }

            .info-content {
                flex: 1;
                font-family: PingFangSC, PingFang SC;
                font-weight: 500;
                font-size: 18px;

                color: #333333;
            }
        }
    }
}

.stats-section {
    width: 1350px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 0;

    .stats-container {
        display: flex;
        gap: 32px;

        .stat-item {
            display: flex;
            align-items: center;
            gap: 8px;

            .iconfont {
                font-size: 20px;
                color: #666;
            }

            .stat-value {
                font-family: PingFangSC, PingFang SC;
                font-weight: 500;
                font-size: 16px;
                color: #333333;
            }
        }
    }

    .action-buttons {
        display: flex;
        gap: 16px;

        .el-button {
            display: flex;
            align-items: center;
            gap: 8px;
        }
    }
}

.video-title {
    font-family: PingFangSC, PingFang SC;
    font-weight: 500;
    font-size: 24px;
    color: #333333;
    margin-bottom: 29px;
}

.video-description {
    width: 1350px;
    margin-top: 24px;
    display: flex;
    padding: 20px 0;
    border-top: 1px dashed #e4e4e4;
    border-bottom: 1px dashed #e4e4e4;

    .description-title {
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        font-size: 18px;
        color: #333333;
        margin-bottom: 12px;
    }

    .description-content {
        font-family: PingFangSC, PingFang SC;
        font-weight: 500;
        font-size: 18px;
        color: #333333;
        line-height: 36px;
        text-align: justify;
    }
}

.video-detail-container {
    padding-top: 24px;
    padding-bottom: 40px;
    display: flex;
    background: #f9faff;
    flex-direction: column;
    align-items: center;

    .content-wrapper {
        width: 1400px;
        display: flex;
        background: #ffffff;
        box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.07);
        border-radius: 8px;
    }
}
</style>
